package chixing.day02;
import java.util.Scanner;
public class zuoye {
    public static void main(String[] args) {
//        yanghuiTriangle();
        int a = 5;
        a=a/2;
        System.out.println(a);

    }
    public static void jinzita() {
        for (int i = 1; i <= 5; i++) {
            for (int j = 1; j <= 5 - i; j++) {
                System.out.print(" ");
            }
            for (int k = 1; k <= 2 * i - 1; k++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public static void jinzita1() {
        for (int i = 1; i <= 5; i++) {
            for (int j = 1; j <= 5 - i; j++) {
                System.out.print(" ");
            }
            for (int k = 1; k <= 2 * i - 1; k++) {
                System.out.print("*");
            }
            System.out.println();
        }
        for (int i = 4; i >= 1; i--) {
            for (int j = 1; j <= 5 - i; j++) {
                System.out.print(" ");
            }
            for (int k = 1; k <= 2 * i - 1; k++) {
                System.out.print("*");

            }
            System.out.println();
        }
    }
    public static void problem1() {
        int[] score = {78,56,67,94,73,80,62,90,88,63};
        for(int i=1 ; i<score.length-2; i++){
            if(score[i]>score[i-1] && score[i]>score[i+1]){
                System.out.println(i);
            }else if(score[i]<score[i-1] && score[i]<score[i+1]){
                System.out.println(i);
            }
        }
    }
    public static void problem2() {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int[] arr = new int[a];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = sc.nextInt();
        }
        for (int i = 0; i < arr.length; i++) {
            for (int j = i + 1; j < arr.length; j++) {
                if (arr[i] > arr[j]) {
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }
            }
        }
        if (arr.length % 2 == 0) {
            System.out.println(arr[arr.length / 2] + arr[arr.length / 2 - 1]);
        }
        else {
            System.out.println(arr[arr.length / 2]);
        }
    }
    public static void problem3() {
        int j = 2;
        for (int i = 5; i <= 100; i += 5) {
            System.out.println(j + "*" + i + "=" + i * j);
            j+=2;
        }
        System.out.println();
    }
    public static void problem4() {
        int[] a = {48, 62, 63, 826, 73, 48, 12, 66, 19, 30};
        int singlecount = 0;
        int doublecount = 0;
        for (int i = 0; i < a.length; i++) {
            if (a[i] % 2 == 1) {
                singlecount++;
            } else {
                doublecount++;
            }
        }
        System.out.println("奇数个数：" + singlecount);
        System.out.println("偶数个数：" + doublecount);
    }
    public static void yanghuiTriangle() {
        int rows = 5;
        int[][] triangle = new int[rows][];

        for (int i = 0; i < rows; i++) {
            triangle[i] = new int[i + 1];
            triangle[i][0] = 1;
            triangle[i][i] = 1;

            for (int j = 1; j < i; j++) {
                triangle[i][j] = triangle[i - 1][j - 1] + triangle[i - 1][j];
            }
        }

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(triangle[i][j] + " ");
            }

            System.out.println();
        }
    }

}